const { default: parser } = require('posthtml-parser')
const fs = require('fs')

const html = `<div class="box" v-bind:name="name">
    <div class="item" v-if="show">啧啧</div>
    <div class="item">{{ sex }}</div>
    <span>
    </span>
</div>
`

const json = parser(html)

fs.writeFileSync('parser.json', JSON.stringify(json, null, 2))
